#include "../mqcommon/helpper.hpp"


int main()
{
    mmq::FileHelper file1("../mqcommon/logger.hpp");
    // DLOG("文件是否存在：%d", file1.Exists());
    // DLOG("文件大小：%ld", file1.Size());

    mmq::FileHelper file2("./aaa/bbb/ccc/tmp.cpp");
    if(!file2.Exists())
    {
        std::string path = mmq::FileHelper::ParentDirectory("./aaa/bbb/ccc/tmp.cpp");
        if(mmq::FileHelper(path).Exists() == false)
            mmq::FileHelper::CreateDirectory(path);
        mmq::FileHelper::CreateFile("./aaa/bbb/ccc/tmp.cpp");
    }

    // std::string body;
    // file1.Read(body);
    // file2.Write(body);
    // char body[16];
    // file2.Read(body, 8, 11);
    // DLOG("[%s]", body);
    // file2.Write("12345678901", 8, 11);

    file2.Rename("./aaa/bbb/ccc/test.cpp");
    mmq::FileHelper::RemoveFile("./aaa/bbb/ccc/test.cpp");
    mmq::FileHelper::RemoveDirectory("aaa");

    return 0;
}